package com.wodsy.phoenix.dataobject.orderc.model;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * ShippingAddress entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_shipping_address", catalog = "orderc")
public class ShippingAddress extends PhoenixObject {

	// Fields

	private Integer id;
	private Integer shippingId;
	private String receiptName;
	private String cellphone;
	private String telephone;
	private String area1Name;
	private String area2Name;
	private String area3Name;
	private String area4Name;
	private String addressDetail;
	private Boolean defaulted;
	private String zipCode;
	private Date createTime;

	// Constructors

	/** default constructor */
	public ShippingAddress() {
	}

	/** minimal constructor */
	public ShippingAddress(Integer shippingId, String receiptName,
			String cellphone, String area1Name, String area2Name,
			String area3Name, String area4Name, String addressDetail,
			Boolean defaulted, Date createTime) {
		this.shippingId = shippingId;
		this.receiptName = receiptName;
		this.cellphone = cellphone;
		this.area1Name = area1Name;
		this.area2Name = area2Name;
		this.area3Name = area3Name;
		this.area4Name = area4Name;
		this.addressDetail = addressDetail;
		this.defaulted = defaulted;
		this.createTime = createTime;
	}

	/** full constructor */
	public ShippingAddress(Integer shippingId, String receiptName,
			String cellphone, String telephone, String area1Name,
			String area2Name, String area3Name, String area4Name,
			String addressDetail, Boolean defaulted, String zipCode,
			Date createTime) {
		this.shippingId = shippingId;
		this.receiptName = receiptName;
		this.cellphone = cellphone;
		this.telephone = telephone;
		this.area1Name = area1Name;
		this.area2Name = area2Name;
		this.area3Name = area3Name;
		this.area4Name = area4Name;
		this.addressDetail = addressDetail;
		this.defaulted = defaulted;
		this.zipCode = zipCode;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "shipping_id", nullable = false)
	public Integer getShippingId() {
		return this.shippingId;
	}

	public void setShippingId(Integer shippingId) {
		this.shippingId = shippingId;
	}

	@Column(name = "receipt_name", nullable = false, length = 20)
	public String getReceiptName() {
		return this.receiptName;
	}

	public void setReceiptName(String receiptName) {
		this.receiptName = receiptName;
	}

	@Column(name = "cellphone", nullable = false, length = 15)
	public String getCellphone() {
		return this.cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	@Column(name = "telephone", length = 15)
	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	@Column(name = "area1_name", nullable = false, length = 20)
	public String getArea1Name() {
		return this.area1Name;
	}

	public void setArea1Name(String area1Name) {
		this.area1Name = area1Name;
	}

	@Column(name = "area2_name", nullable = false, length = 20)
	public String getArea2Name() {
		return this.area2Name;
	}

	public void setArea2Name(String area2Name) {
		this.area2Name = area2Name;
	}

	@Column(name = "area3_name", nullable = false, length = 20)
	public String getArea3Name() {
		return this.area3Name;
	}

	public void setArea3Name(String area3Name) {
		this.area3Name = area3Name;
	}

	@Column(name = "area4_name", nullable = false, length = 20)
	public String getArea4Name() {
		return this.area4Name;
	}

	public void setArea4Name(String area4Name) {
		this.area4Name = area4Name;
	}

	@Column(name = "address_detail", nullable = false, length = 150)
	public String getAddressDetail() {
		return this.addressDetail;
	}

	public void setAddressDetail(String addressDetail) {
		this.addressDetail = addressDetail;
	}

	@Column(name = "defaulted", nullable = false)
	public Boolean getDefaulted() {
		return this.defaulted;
	}

	public void setDefaulted(Boolean defaulted) {
		this.defaulted = defaulted;
	}

	@Column(name = "zip_code", length = 10)
	public String getZipCode() {
		return this.zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}